//
//  BasicVC.h
//  AccountEasy
//
//  Created by mac on 2020/7/22.
//  Copyright © 2020 AccountEasy. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef void (^CallBack)(NSDictionary * dict);

@interface BasicVC : UIViewController

@property (nonatomic, strong ,readonly) UIView *navItemBgView;//!<包括statusView和navItemView
@property (nonatomic, strong) UIView *navItemView;
@property (nonatomic, strong) UIView *statusView;
@property (nonatomic, strong ,readonly) UILabel *titleLab;
@property (nonatomic, strong ,readonly) UIButton *backBBI;
@property (nonatomic, strong) UIButton *rightTitleBtn;   //!<右边button

/**
 设置导航栏标题和返回按钮
 
 @param title 标题
 */
- (void)setNavigationItemBackBBIAndTitle:(NSString *)title;
- (void)setTitle:(NSString *)title;

//设置标题的颜色和字体 (传入需要改变的部分字符)
- (void)setTitleColor:(NSString *)title Color:(UIColor *)color Font:(UIFont *)font;

//设置背景图片
- (void)setBgImage:(UIImage *)image;

/**
 设置导航栏标题和自定义返回按钮名字
 
 @param backName 自定义返回名
 @param title    标题
 */
- (void)setNavigationItemBackBBI:(NSString *)backName AndTitle:(NSString *)title;

/**
 设置导航栏两侧视图
 
 @param views 视图数组
 */
- (void)addRightViews:(NSArray *)views;
- (void)addLeftViews:(NSArray *)views;


/**
 初始化UI界面，由子类实现，父类调用
 */
- (void)initUI;
- (void)initData;

/**
 返回上一层界面
 */
- (void)backToLastVC;

/**
 push到指定的vc
 */
-(void)pushVC:(NSString *)controllerName :(BOOL)animated;

/**
 pop到指定的vc，如果堆栈中不存在，就push到该vc
 */
-(void)popVC:(NSString *)controllerName :(BOOL)animated;


/**
 移除navItemView
 */
- (void)removeNavItemView;

/**
 适配iPhoneX 填充底部为灰色
 */
- (void)fillBottomView;

@end

